![]() ![]() |
Q: How do I use QuartzDebug to debug graphics issues? A: QuartzDebug is a debugging interface for the Quartz graphics system with several powerful tools to help you identify a number of graphics display and performance problems. The latest version of Quartz Debug can be downloaded from here. Note: despite its name, QuartzDebug can also be an effective tool for debugging QuickDraw operations on Mac OS X since ultimately all drawing operations pass through Quartz. Options Window and Window ListUpon launch, the QuartzDebug options window Figure 1 appears. It contains four debugging checkboxes (all initially deselected) and a Show Window List button. The "Autoflush drawing" checkbox flushes the contents of a CoreGraphics graphics context after each drawing operation, rather than wait for the CGContextFlush(). This is useful for examining every single drawing operation. When "Flash screen updates" is selected, regions of the screen that are about to be updated are painted yellow, followed by a brief pause, followed by the actual screen update. This allows you to see screen updates as they occur. The pause allows you to see the region in yellow; without it, the screen would be updated immediately, possibly faster than you can perceive it. To turn off the pause, select the "No delay after flash option." When "Flash identical updates (red)" is selected, regions of the screen that are about to be updated, but are the same as the content already present in the window backing store, are painted red. The red is followed by a brief pause, followed by the actual screen update. This allows you to see which regions of the window are being drawing redundantly as the content is already present in the window backing store. To turn off the pause, select the "No delay after flash option."
Use the Show Window List button to display a window containing a static snapshot of the system-wide window list. The list identifies the owner of each window and the memory the window occupies. This is useful for understanding the impact of buffered windows on your application's memory footprint. Figure 2 shows a sample window list and Table 1 explains the meaning of each column in the window list. This list is a snapshot, not updated automatically. To update the snapshot, either press the Show Window List button again, or choose Show Window List from the File menu. Note that you will need to scroll the window list window down to see the new snapshot.
Table 1. QuartzDebug window list columns
Tools Menu OptionsThe Tools menu provides a few other options The "Show/Hide Frame Meter" menu option displays or hides the performance frame meter as shown in Figure 3. The frame meter displays the number of screen updates per second. It also includes a mini cpu frame meter that displays the cpu usage. It is a transparent window, that can moved around by click-dragging from any part of the window.
The "Disable/Enable Quartz Extreme" menu option allows you to disable or re-enable Quartz Extreme in the system. See the Quartz Extreme page for more information. The "Refresh Windows List" refreshes the window list available from the Options Window. [Mar 27 2002] |
Developer Documentation | Technical Notes | Development Kits | Sample Code |